package com.huonan.utils;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.dfa.WordTree;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.logging.log4j.core.util.UuidUtil;

public class HashAlgorithm {
    /**
     * MD5算法
     */
    public static void Md5() {
        String fileUrl = "/bailian/regulation/20230610/dianping/dianping.com/data_xx.zip";
        // hutool
        String r1 = SecureUtil.md5(fileUrl);
        // 自定义
        String r2 = MD5Util.encryption(fileUrl);
        // Apache
        String r3 = DigestUtils.md5Hex(fileUrl);
        System.out.println(r1);
        System.out.println(r2);
        System.out.println(r3);
        long timeBasedUuid = UuidUtil.getTimeBasedUuid().getLeastSignificantBits();
        WordTree tree = new WordTree();
    }
}
